package com.day15_Stream;

import java.util.*;
import java.util.stream.Stream;

/**
 * @ClassName: Product_stream
 * @Author: zw
 * @Description: 出百万拳，行万里路；
 * @Create 2024/3/30-20:06
 * @Version 1.0
 */
public class Product_stream {
    public static void main(String[] args) {
        // Collection 体系生产调用strem
        List<String> list = new ArrayList<String>();
        Stream<String> listStrem = list.stream();
        Set<String> set = new HashSet<>();
        Stream<String> setSteam = set.stream();

        // Map体系的集合不能直接生成流但是可以间接生成流
        // map调用keySet方法然后生产流
        HashMap<String, Integer> map = new HashMap<>();
        Stream<String> mapStream = map.keySet().stream();
        // 2. map调用values（）方法然后生成流
        Stream<Integer> mapStream1 = map.values().stream();

        // 数组通过Stream接口的静态方法of（T...values）生成流
        String[] strArr = {"hello", "world", "java"};
        Stream<String> strArrStream = Stream.of(strArr);
        Stream<String> strArrStream1 = Stream.of("hello", "world", "java");
        Stream<Integer> integerSteam = Stream.of(10, 30, 23);



    }
}
